<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/CheckLoginBackend.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>二组牛逼</title>
<link type="text/css" rel="stylesheet" href="../statics/css/style.css" />
<script type="text/javascript" src="../statics/js/jquery.js"></script>
</head>
<body>
	<%@include file="../common/Admin_Header.jsp"%>
	<div class="i_bg bg_color">
		<!--Begin 用户中心 Begin -->
		<div class="m_content">

			<%@include file="../common/Admin_left.jsp"%>


			<div class="m_right" id="content">
				<div class="mem_tit">新增用户</div>

				<script>
					function check() {
							var idReg = /^\d{18}$/;
							var phoneReg = /^1[0-9]{10}$/;
							var emailReg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
							if ($("#l_user").val() == "") {
								alert("用户名不能为空");
								return false;
							} else if ($("#l_mem").val() == "") {
								alert("姓名不能为空");
								return false;
							} else if (!idReg.test($("#l_num").val())) {
								alert("身份证号格式不正确");
								return false;
							} else if (!emailReg.test($("#l_email").val())) {
								alert("邮箱合适不正确");
								return false;
							} else if (!phoneReg.test($("#l_phone").val())) {
								alert("手机号格式不正确");
								return false;
							}
							return true;
						}
				</script>

				<br>
				<form action="UserListServlet?action=AddUser" method="post"
					onsubmit="return check()">
					<table border="0" class="add_tab" style="width:930px;"
						cellspacing="0" cellpadding="0">
						<tr>
							<td align="right">真实姓名</td>
							<td><input type="text" id="l_mem" name="l_mem" /></td>
						</tr>
						<tr>
							<td align="right">用户名称</td>
							<td><input type="text" id="l_user" name="l_user" /> <span
								id="l_usertext" style="color:red;"></span></td>
						</tr>
						<tr>
							<td align="right">登录密码</td>
							<td><input type="text" id="l_password" name="l_password" /></td>
						</tr>
						<tr>
							<td align="right">身份证号</td>
							<td><input type="text" id="l_num" name="l_num" /></td>
						</tr>
						<tr>
							<td align="right">电子邮箱</td>
							<td><input type="text" id="l_email" name="l_email" /></td>
						</tr>
						<tr>
							<td align="right">手机</td>
							<td><input type="text" id="l_phone" name="l_phone" /></td>
						</tr>
						<tr>
							<td align="right">性别</td>
							<td><select name="l_sex">
									<option value="1">男</option>
									<option value="0">女</option>
							</select></td>
						</tr>
						<tr>
							<td align="right">类型</td>
							<td><select name="l_type">
									<option value="0">管理员</option>
									<option value="1">用户</option>
							</select></td>
						</tr>

						<tr>
							<td></td>
							<td><input type="submit" value="确定新增" class="s_btn" /></td>
						</tr>
					</table>
				</form>
			</div>
		</div>

	</div>
</body>
</html>


